/*
 *  Copyright 2004 Blandware (http://www.blandware.com)
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */
package com.blandware.atleap.webapp.taglib.core.grid;

import com.blandware.atleap.webapp.taglib.core.BaseHandlerTag;

/**
 * <p>Base class for filter tags. This defines only attributes common for
 * filter tags but no processing logic.</p>
 * <p>
 * Attributes defined by this class are:
 * <ul>
 * <li>
 * <b>fieldName</b> - field name to associate filter with
 * </li>
 * <li>
 * <b>fieldKey</b> - bundle key for internationalized name of field
 * </li>
 * <li>
 * <b>rowIterators</b> - comma-separated list of rowIterators IDs this filter
 * is applicable to. This is needed to constrain what row iterators will be
 * affected by this filter (as there may be several row iterators in a single
 * grid) - those IDs must be listed here; if this list is empty or not given,
 * any iterator will match (so this filter will affect all iterators in grid).
 * </li>
 * </ul>
 * </p>
 * <p><a href="BaseFilterTag.java.html"><i>View Source</i></a></p>
 *
 * @author Sergey Zubtsovskiy <a href="mailto:sergey.zubtsovskiy@blandware.com">&lt;sergey.zubtsovskiy@blandware.com&gt;</a>
 * @version $Revision: 1.9 $ $Date: 2006/08/03 10:08:16 $
 */
public class BaseFilterTag extends BaseHandlerTag {

	// ~ Instance variables

	/**
	 * Field name to associate filter with.
	 */
	protected String fieldName;

	/**
	 * Bundle key for internationalized name of field
	 */
	protected String fieldKey = null;

	/**
	 * Comma-separated list of rowIterators IDs this filter is applicable to
	 */
	protected String rowIterators = null;

	/**
     * Returns name of field to which this filter corresponds
     *
	 * @return field name
	 * @jsp.attribute required="false"
	 * rtexprvalue="true"
	 * type="java.lang.String"
	 * description="Field name to associate filter with."
	 */
	public String getFieldName() {
		return fieldName;
	}

    /**
     * Sets name of field to which this filter corresponds
     *
     * @param fieldName field name to set
     */
	public void setFieldName(String fieldName) {
		this.fieldName = fieldName;
	}

	/**
     * Returns bundle key that contains internationalized name of field
     *
	 * @return bundle key
	 * @jsp.attribute required="false"
	 * rtexprvalue="true"
	 * type="java.lang.String"
	 * description="Bundle key contains internationalized name of field"
	 */
	public String getFieldKey() {
		return fieldKey;
	}

    /**
     * Sets bundle key that contains internationalized name of field
     *
     * @param fieldKey bundle key to set
     */
	public void setFieldKey(String fieldKey) {
		this.fieldKey = fieldKey;
	}

	/**
     * Returns comma-separated list of rowIterators IDs this filter is applicable to
     *
	 * @return list of rowIterators IDs
	 * @jsp.attribute required="false"
	 * rtexprvalue="true"
	 * type="java.lang.String"
	 * description="Comma-separated list of rowIterators IDs this filter is applicable to"
	 */
	public String getRowIterators() {
		return rowIterators;
	}

    /**
     * Sets comma-separated list of rowIterators IDs this filter is applicable to
     *
     * @param rowIterators list of rowIterators IDs to set
     */
	public void setRowIterators(String rowIterators) {
		this.rowIterators = rowIterators;
	}

}
